package com.plant.physician.mapper;

import com.plant.physician.domain.Physician;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface PhysicianMapper {
    void insert(Physician physician);
    @Select("select * from physician where user_id=#{userId}")
    Physician findById(Integer userId);

    List<Physician> selectPhy();
    @Update("update physician set status=#{status},by_time=#{byTime} where user_id=#{userId}")
    void updateStatus(Physician physician);
    @Update("update user set type=2 where id=#{userId}")
    void updateUserStatus(Physician physician);
    List<Physician> findAll();
}
